package cn.edu.ujn.booking.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.ujn.booking.dao.Drama;
import cn.edu.ujn.booking.dao.DramaMapper;
@Service
public class DramaServiceImpl implements DramaService{
	@Autowired
	private DramaMapper dramaMapper;
	@Override
	public List<Drama> findAll() {
		// TODO 自动生成的方法存根
		List<Drama> dramas = dramaMapper.findAll();
		return dramas;
	}
	@Override
	public int createDrama(Drama drama) {
		// TODO 自动生成的方法存根
		int drama2 = dramaMapper.createDrama(drama);
		return drama2;
	}
	@Override
	public int deleteByPrimaryKey(Integer id) {
		// TODO 自动生成的方法存根
		int deleteByPrimaryKey = dramaMapper.deleteByPrimaryKey(id);
		return deleteByPrimaryKey;
	}
	@Override
	public int updateDrama(Drama drama) {
		// TODO 自动生成的方法存根
		int updateDrama = dramaMapper.updateDrama(drama);
		return updateDrama;
	}
	@Override
	public Drama getDramaById(int id) {
		// TODO 自动生成的方法存根
		Drama drama = dramaMapper.getDramaById(id);
		return drama;
	}
	@Override
	public List<Drama> selectDramasByName(String name) {
		// TODO 自动生成的方法存根
		List<Drama> list = dramaMapper.selectDramasByName(name);
		return list;
	}

}
